package com.wpp.controller;
//部门信息

import com.github.pagehelper.PageHelper;
import com.wpp.pojo.Department;
import com.wpp.pojo.Msg;
import com.wpp.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/dept")
public class DeptController {
    @Autowired
    private DeptService deptServiceImpl;

    @RequestMapping("/depts")
    @ResponseBody
    public Msg findDept() {
        List<Department> deptAll = deptServiceImpl.findDeptAll();
        System.out.println(deptAll + "====================");
        return Msg.success().add("deptAll", deptAll);
    }
}
